import { formatDate } from '@/utils/util'
import Pagination from '@/components/Pagination'
export default {
	data() {
		return {
			data: [],
			show:false,
			Request:{
				flightDate:"",
				flightNo:"",
				pageNum:1,
				pageSize:10,
			},
			flightNoList: [{
				value: "MU123",
				label: "MU123",
			}, ],
		}
	},
	computed: {

	},
	watch: {

	},
	methods: {
		search(){
			this.Request.flightDate = formatDate(this.Request.flightDate);
			this.$http.post('api/schedule',this.Request)
				.then((res) => {
					if(res.data.code=='601'){
						this.show = true;
						this.data = res.data.data.list;
						return;
					}
					//请求失败的处理
					this.show = false;
					this.$Notice.error({
	                    title: '查询失败',
	                    desc: res.data.message
	                });
				})
				.catch((err) => {
					//请求失败的处理
					this.show = false;
					this.$Notice.error({
						title: '查询失败',
						desc: err
					});
					return false;
				})
			
		},
	},
	components: {
		Pagination
	},
	created() {
		this.search();
	}
}